<% content_for :header do %>
<div id="nav">
  <ul>
    <li><a href="/intro">活动介绍</a></li>
    <li><a href="/join" class="current">如何参与</a></li>
    <li><a href="/news">最新动态</a></li>
    <li><a href="/contact">联系我们</a></li>
  </ul>
</div>
<div id="pagetitle">
  <h1>学 校 列 表</h1>
</div>
<% end %>

<div id="content">
  <div id="innercontent">
    <h3 style="margin:20px 0">3年多的时间，多背一公斤的志愿者们走访了200所学校</h3>
    <p class="center" style="margin:0 10px;">
    <% for province in @provinces -%>
      <a href="#province-<%= province.id%>"><%= province.title %></a>&nbsp;
    <% end -%>
    </p>
    <% flag = 0 -%>
    <% @schools.each do |school| -%>      
      <% if school.province_id != flag %>        
        <h3><a name="province-<%= school.province_id %>"></a><%= school.province.title %></h3>
        <% flag = school.province_id -%>
      <% end -%>
      
      <p><%= link_to school.title, school_path(school) %></p>
    <% end -%>
  </div>  
</div>